<template>
  <div class="logout">
    退出登录中...请不要乱动
  </div>
</template>

<script>
  import { mapActions } from 'vuex';
  export default {
    data() {
      return {};
    },
    mounted() {
      this.$service.AuthLogout().then(() => {
        this.$setToken('');
        this.$setMenus([]);
        this.$setUserInfo({});
        this.$setPermission([]);
        this.$router.replace({ name: 'Login', query: this.$route.query });
      });
    },
    methods: {
      ...mapActions(['$setMenus', '$setPermission']),
    },
  };
</script>

<style lang="less" scoped></style>
